<!DOCTYPE HTML>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
    <title>UMEDITOR 完整demo</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <!--<link href="themes/default/css/umeditor.css" type="text/css"-->
          <!--rel="stylesheet">-->
    <!--<script type="text/javascript" src="third-party/jquery.min.js"></script>-->

    <!--<script type="text/javascript" charset="utf-8" src="ueditor.all.min.js"> </script>-->
    <script src="http://cdn.bootcss.com/angular.js/1.5.7/angular.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="ueditor.config.js"></script>
    <script src="ueditor.all.js"></script>
    <script type="text/javascript" src="lang/zh-cn/zh-cn.js"></script>
</head>
<body ng-app="app" ng-controller="main">
<h1>UMEDITOR 完整demo</h1>

<!--style给定宽度可以影响编辑器的最终宽度-->
<form action="/post" method="post">
    類型:
    <label><input type="radio" name="type" value="原創" checked>原創</label>
    <label><input type="radio" name="type" value="轉載">轉載</label>
    <label><input type="radio" name="type" value="翻譯">翻譯</label>
    <br>
    標籤:
    <label ng-repeat="tag in tags track by $index">
        <input type="checkbox" name="tag" value="{{tag}}">
        {{tag}}
    </label>
    <br>
    分類:
    <label ng-repeat="category in categories track by $index">
        <input type="checkbox" name="category" value="{{category}}">
        {{category}}
    </label>
    <br>
    標題:<input name="title"> <br>
    頭圖:<input name="pic"> <br>
    <textarea id="myEditor" name="content" style="width:1000px;height:240px;"></textarea>
    <button ng-click="submit()">sub</button>
    <!--<button class="btn" onclick="getContent()">获得内容</button>-->
</form>
<iframe src="/imgUp" boder="0"></iframe>

<script type="text/javascript">
    UE.getEditor('myEditor');
    angular.module('app',[]).controller('main',function($scope,$http){
        $http.get('/tag').then(function (res) {
            $scope.tags = res.data;
        });
        $http.get('/category').then(function (res) {
            $scope.categories = res.data;
        });
        $scope.submit=function(){}
    })
</script>

</body>
</html>